<include file="Public:header" />
<form class="form-horizontal" method="post" id="form">
  <table class="table table-striped">
    <tr>
      <td>
        <div class="form-group">
          <label class="col-sm-2 control-label" for="name">导航标题：</label>
          <div class="col-md-3">
            <input type="text" class="form-control" id="name" name="name" value="{$name}" data-rule="导航标题:required" placeholder="导航标题">
          </div>
        </div>
      </td>
    </tr>
    <tr>
      <td><div class="form-group">
          <label class="col-sm-2 control-label" for="pid">所属上级：</label>
        <div class="col-md-3">
          <select name="pid" id="pid" class="form-control">
          <option value="0" <if condition="$cid eq '0'">selected="selected"</if>>一级栏目</option>
          <volist name="nav" id="vo">
            <if condition="$vo['pid'] eq '0'"><option value="{$vo['id']}" <if condition="$vo['id'] eq $pid">selected="selected"</if>>{$vo['name']}</option></if>
          </volist>
          </select>
        </div> </div></td>
    </tr>
    <tr>
      <td>
        <div class="form-group">
          <label class="col-sm-2 control-label" for="url">导航模块：</label>
          <div class="col-md-2">
            <input type="text" class="form-control" name="url" id="url" value="{$url}" placeholder="分组名/模块名/方法名">
          </div>
          <span class="help-block">例:Admin/Index/index </span>
        </div></td>
    </tr>
    <tr>
      <td>
        <div class="form-group">
          <label class="col-sm-2 control-label" for="data">参数：</label>
          <div class="col-md-3"> <input type="text" class="form-control" name="data" id="data" value="{$data}" placeholder="链接参数"></div>
          <span class="help-block">例:groupid=1&type=2 </span>
        </div></td>
    </tr>
    <tr>
      <td>
        <div class="form-group">
          <label class="col-sm-2 control-label" for="remark">备注：</label>
          <div class="col-md-5">
            <textarea name="remark" style="width:500px; height:80px; resize:none;" id="remark" class="form-control">{$remark}</textarea>
          </div>
        </div>
      </td>
    </tr>
    <tr>
      <td><div class="form-group">
          <label class="col-sm-2 control-label" for="sort">排序：</label>
        <div class="col-md-1">
          <input type="text" class="form-control" name="sort" id="sort" value="{$sort}" placeholder="链接排序">
        </div> </div></td>
    </tr>
    <tr>
      <td><div class="form-group">
          <label class="col-sm-2 control-label" for="status">状态：</label>
        <div class="col-md-2">
          <select name="status" id="status" class="form-control">
            <option value="1" <if condition="$status eq '1'">selected="selected"</if>>开启</option>
            <option value="0" <if condition="$status eq '0'">selected="selected"</if>>禁用</option>
          </select>
        </div> </div></td>
    </tr>
    <tr>
      <td><div class="form-group">
          <label class="col-sm-2 control-label" for="type">类型：</label>
        <div class="col-md-2">
          <select name="type" id="type" class="form-control">
            <option value="admin" <if condition="$type eq 'admin'">selected="selected"</if>>后台菜单</option>
            <option value="fornt" <if condition="$type eq 'fornt'">selected="selected"</if>>会员菜单</option>
          </select>
        </div> </div></td>
    </tr>
    <tr>
      <td><div class="col-sm-offset-2 col-md-5">
          <input type="submit" class="btn btn-default" name="submit" value="确认提交">
        </div></td>
    </tr>
  </table>
</form>
<div class="clear"></div>
<script>
$(function(){
	var v = $("#form").validate({
		rules:{
			"name":"required",
			"url":"required"
		},
		success: function (lable){
			lable.ligerHideTip();
			lable.remove();
		}
	});

});
</script> 
<include file="Public:footer" />